package com.carrot.uaa.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.carrot.uaa.constant.RedisConstants;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

import java.io.Serializable;
import java.time.Instant;

/**
 * 客户端实体
 */
@Data
@RedisHash(value = RedisConstants.CLIENT)
@TableName("oauth2_registered_client")
public class RedisClient implements Serializable {
    @Id
    private String id;
    @Indexed
    private String clientId;
    private Instant clientIdIssuedAt;
    private String clientSecret;
    private Instant clientSecretExpiresAt;
    private String clientName;
    private String clientAuthenticationMethods;
    private String authorizationGrantTypes;
    private String redirectUris;
    private String scopes;
    private String clientSettings;
    private String tokenSettings;
    private String postLogoutRedirectUris;
}
